import { NavLink, useParams} from "react-router-dom"

export default function Nav() { 
  const { t } = useParams();
  return (
    <nav className="nav">
      <NavLink to="/index/all"
        isActive={() => {
          return t === 'all';
        }}
        exact>全部</NavLink>
      <NavLink to="/index/good" >精华</NavLink>
      <NavLink to='/index/share'>分享</NavLink>
      <NavLink to='/index/ask'>问答</NavLink>
  </nav>
  )
}